﻿using BoilerplateWPF.Services;
using BoilerplateWPF.Services.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BoilerplateWPF.Utils
{
    /// <summary>
    /// 静态服务提供类（静态服务访问器）
    /// </summary>
    public static class ServiceLocator
    {
        public static IUserService UserService { get; set; } = new UserService();

        // 如果需要测试 可以这样扩展
        //private static IUserService _userService = new UserService();

        //public static IUserService UserService
        //{
        //    get => _userService;
        //    set => _userService = value;
        //}

        //// 重置为默认服务（可选）
        //public static void ResetToDefault()
        //{
        //    _userService = new UserService();
        //}

        //public static IUserService TestUserService { get; set; } = new MockUserService();
    }
}
